<!-- dialog -->
<template>
     <div>
      <el-dialog
            title="招聘详情"
            :visible.sync="visible"
            :modal-append-to-body='false'
            @close="$emit('update:show', false)"
           >
            <el-descriptions direction="vertical" :column="3" border>
                <el-descriptions-item label="企业名称" :span="2">{{detailRow.enterpriseName}}</el-descriptions-item>
                <el-descriptions-item label="联系电话" :span="2">{{detailRow.phone}}</el-descriptions-item>
                <el-descriptions-item label="招聘联系人" :span="2">{{detailRow.leader}}</el-descriptions-item>
                <el-descriptions-item label="招聘岗位" :span="2">
                    <el-tag size="small">{{detailRow.posName}}</el-tag>
                </el-descriptions-item>
                <el-descriptions-item label="薪资" :span="2">{{detailRow.salary}}</el-descriptions-item>
                <el-descriptions-item label="招聘时间" :span="2">{{detailRow.recruimentTime ? detailRow.recruimentTime.replace(/^(\d{4})-(\d{2})-(\d{2})/g,'$1年$2月$3日') : '暂定'}}</el-descriptions-item>
                <el-descriptions-item label="性别要求" :span="2">
                    <el-tag size="small">{{detailRow.gender}}</el-tag>
                </el-descriptions-item>
                <el-descriptions-item label="是否有效" :span="2">
                    <el-tag size="small">{{detailRow.state === 1 ? '是' : '否'}}</el-tag>
                </el-descriptions-item>
                <el-descriptions-item label="招聘地址" :span="6">{{detailRow.recruitmentAddress}}</el-descriptions-item>
                <el-descriptions-item label="招聘内容" :span="6"><span style="white-space: pre-wrap;">{{detailRow.content}}</span></el-descriptions-item>
            </el-descriptions>
            
        </el-dialog>
    </div>

</template>

<script>
export default {
    name: 'RecruitInfoDialog',    
    data () {
        return {
            visible: this.show,
        };
    },
    props: {
        show: {
            type: Boolean,
            default: false
        },
        detailRow: {
            type: Object,
            require: true,
        }
    },
    watch: {
        show () {
            this.visible = this.show;
        },
    },
    methods:{
       
    }
}
</script>

<style scoped>

</style>
